minor CMake and code fix for Qt5