Replace some PLATFORM_OSX with GDK_WINDOWING_X11
Tighten scope of PLATFORM_OSX conditional around Gnome specific code