correctly find Homebrew-installed fortran

Fixes #26338