Qt5 build fixes