include time.h for compatibility with 13.04, which doesn't include that in unistd.h.  closes #2, thanks Jeremy Wells.
additional includes for better standards compliance