Updated CMakeLists.txt to better check for c++11