The test project is compiled with a `-DVAR` compiler flag where `VAR` is
the result variable. Tell `try_compile` to add the flag through
`add_definitions` instead of `CMAKE_Fortran_FLAGS` so that it is not
used for linking. Otherwise some Fortran compilers (e.g. XL 15) do not
like the flag when used to drive linking.