Apply patch for build failure on OS X 10.6/7