Use correct CXXFLAGS for deps generation.

Working towards issue #1