CMakeLists.txt: Fix -std=c++11 flag not being set correctly.

It was being set for every source file, which included C files. This generated warnings when compiling with the GNU compiler, and errors when compiling with clang.