fixed CMake for Gentoo hosts