Minor changes to get this to run on Mac OS X for testing