Geant doesn't respect the CC or CXX environment variable.

I've added a bit of code to work around this for gcc/g++.

Please let me know if there is a problem with this modification.