Replaced Q_WS_MAC with Q_OS_MAC

Q_WS_MAC was removed in Qt 5, so some Mac-specific code was not getting
compiled in. This change fixes icons appearing in menus and the
handling of external commands on Mac OS X.