Improved OSX build script for CI