OSX build fixes and documentation update.