Some additions to compile on OSX Mavericks