OSX build fixes.