Fix CMake linker flags.

By default CMake adds the language compiler flags (CXX in this case)
as flags to the linker step. Remove the CXX compiler flags when linking.