CXXFLAGS need to be part of linking as well.

 * Especially for buildtype=profiling or debugging where the -g or -pg flag
   need to be passed during linking