Cocoa: Fix internal symbol hiding for dylib

The default symbol visibility was not set to hidden on macOS.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1928670..4ff82d7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -140,7 +140,9 @@
 
         set_target_properties(glfw PROPERTIES
                               INSTALL_NAME_DIR "${CMAKE_INSTALL_LIBDIR}")
-    elseif (UNIX)
+    endif()
+
+    if (UNIX)
         # Hide symbols not explicitly tagged for export from the shared library
         target_compile_options(glfw PRIVATE "-fvisibility=hidden")
     endif()