[configure] Use CXXFLAGS instead of OPT_CXXFLAGS

Because OPT_CXXFLAGS are overwritten by CXXFLAGS.