Fix some things for Mac OS X