Fix Qt5 compilation issues