fix Segmentation faults in 10.9, with patch from https://github.com/facebook/hhvm/issues/1300