Qt5 qmake detection and other fixes.