Fix more build issues in macos mavericks
Add new patches that fixes many build issues reported in macos mavericks