Fixed build failures while compiling with Qt5