fixes build error on windows

removes unistd.h include; it wasn't being used anyway
adds snprintf macro for windows