Changes needed for building on Mac OS X