Wrap #include <unistd.h> inside an #ifdef HAVE_UNISTD_H.