qt5 compatibility fixes
Added building with cmake