autotools: allow CXXFLAGS to be overrided from the environment.

This is based on the patch for the Debian bug #707925 by Jason
White <jason@jasonjgw.net>.