Examine wrapper name instead of underlying compiler name

This revision fixes a bug in which bf-gfortran was not being
recognized as the gfortran wrapper whenever the BF_GFORTRAN
environment variable was defined.