Fix the misapplied CXXFLAGS.

-Os is a compiler flag, it doesn't belong in the call to the linker.
Likewise, -s is a linker flag, it doesn't belong in the call to the
compiler.

Clang 3.4 apparently now considering misapplied flags to be worthy of
error status when -Werror is applied. Solution: don't give CXXFLAGS to
LD, nor LDFLAGS to CXX. Note that most of this was already correct.
Merge pull request #8122 from narc0tiq/fix-misapplied-compiler-flags

Fix the misapplied CXXFLAGS.