Added include protection for unistd.h and sys/time.h.

diff --git a/memory/global.c b/memory/global.c
index 9cfe90a..7f143cf 100644
--- a/memory/global.c
+++ b/memory/global.c
@@ -26,7 +26,9 @@
 #include <stdlib.h>
 #include <time.h>
 #include <stdio.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 #include <string.h>
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>