Changes to compile on OSX 10.8.4