Added support for Mac OSX (macports and home-brew)