Add CXXFLAGS to linker on advice from Ben.