Some minor changes to compile this project under OS X