fixes for cmake and qt4 build