Minor changes to build on OSX.