Run AC_PROG_CXX in the right place.