Add some missing prototypes that were causing xcodebuild to fail.
Add some ifdefs to make things compile on 10.6