Platform detection fixes in Qt makefile