Fix the Mac detection macro for qt5

There was a bunch of mac specific code that was not being picked up in
the Qt5 build due to an obsolete macro being used.

Changed Q_WS_MAC to MAC_OSX and now we are getting these changes again.