Fix some QT5 build issues