Using struct timeval requires sys/time.h, fixes compilation on some OSes