build on osx

- cherry-picked 2ea153b and 617c7f5 from dev_macosxbuild
- added macos_homebrew.sconf