GitHub Actions: Replace macos-latest with macos-12

macos-latest used to be macos-12, but now it is macos-14, which we
already have. It's better to just use version numbers to prevent this
happening again in the future.