add osx compile patch for homebrew

some patch files for mac osx