Modifications so scripts also works on OS X