Applying patch for THRIFT-1908 to fix PHP extension segfaults