RF: set PATH CC CXX for gfortran

Check gfortran is compiler on the path.
Fix use of check_env also.