fix-macosx.py script from https://github.com/fix-macosx/fix-macosx