Fix Fortran compiler detection