Fixes for compilation on OSX Mavericks - must specify OSTYPE=osx.