Fix compilation with g++-4.8 + better Cmake
Do not ignore CMAKE_CXX_FLAGS provided by the user.