Build fixes for OSX Mavericks with brew