Fix passing of arguments from CFLAGS and CXXFLAGS in the environment when detecting the compiler.