Fix platform check

Include <QtGlobal> which defines Q_OS_* before the check, otherwise it may (and does on FreeBSD) work incorrectly
Merge pull request #1463 from AMDmi3/patch-1

Fix platform check