Mac OS X support

The attached commits add support for installing on Mac OS X via homebrew.