modifed to build with up to current version of OSX Maveric with brew