Fixes the Mac OS X startup script (patch provided by Pavel Tankov)