Add a #include of <sys/types.h> to sha1.c.  I am told this help it to
compile on BSD systems.