Correctly find Homebrew-installed fortran

Fixes #26338.
Closes #26352.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>