Qt5 compilation fixes