add unistd.h to be compatible with freebsd