Some updates to get it running and compiling on Mac OS 10.8