Fixes for OSX.

Various fixes to get Bootil compiling in Xcode 4 on OSX.