OSX build patches