All the changes needed to build on OSX.