changes to try to get it to work on mac and unix