Fix cxx and linker flags.