Added #include <unistd.h> for windows build support grough CYGWIN