configure: use cc/c++ instead of gcc/g++

Some systems (e.g. FreeBSD 10) do not ship with the GNU Compiler
Collection.  Use generic cc/c++ instead of gcc/g++ (unless the
CC/CXX environment variables are used).