THRIFT-851. php: php extension fails to compile on centos 5.x

This patch introduces an approach that is compatbile with both centos and Mac.

Patch: Todd Lipcon

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@986410 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/protocol/TProtocol.h b/lib/cpp/src/protocol/TProtocol.h
index 7d7b065..2e24f75 100644
--- a/lib/cpp/src/protocol/TProtocol.h
+++ b/lib/cpp/src/protocol/TProtocol.h
@@ -76,8 +76,8 @@
 
 using apache::thrift::transport::TTransport;
 
-#ifdef HAVE_ENDIAN_H
-#include <endian.h>
+#ifdef HAVE_SYS_PARAM_H_
+#include <sys/param.h>
 #endif
 
 #ifndef __BYTE_ORDER