THRIFT-3326 Tests do not compile under *BSD

Patch: Joao Neves
diff --git a/lib/c_glib/test/testbinaryprotocol.c b/lib/c_glib/test/testbinaryprotocol.c
index 517fd25..cd65501 100755
--- a/lib/c_glib/test/testbinaryprotocol.c
+++ b/lib/c_glib/test/testbinaryprotocol.c
@@ -20,7 +20,11 @@
 /* Disable string-function optimizations when glibc is used, as these produce
    compiler warnings about string length when a string function is used inside
    a call to assert () */
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && \
+    !defined(__OpenBSD__) && !defined(__NetBSD__)
 #include <features.h>
+#endif
+
 #ifdef __GLIBC__
 #define __NO_STRING_INLINES 1
 #endif