Fix linker error on Win/Mac systems

Q_WS_WIN and Q_WS_MAC are not defined anymore in Qt5