see #19937 - Update macOS build process (patch by Stereo, modified)
See See https://github.com/openstreetmap/josm/pull/65