generate the run-time dependency according to the build system, not
hard-coded
The advantage for CI is that it does no longer need to be upgraded every
time the GH runner was updated.
This also generalizes for non-CI builds, when the build macOS version
can obviously differ from the CI macos runner.
Do not use both Darwin and macOS version, use just macOS ver.