This enables cross-compiling on Apple Silicon so the game can be run. The result is not a native ARM64 binary but an x86_64 binary run in Rosetta, however the code should be easy enough to update when needed.
I've tested this on Monterey 10.12, but it would need testing on 10.XX to be sure it actually works.
SDL upgrade is necessary for compilation with the GLES headers in different SDKs.