Made CMakeLists.txt support non-clang compilers