Replace clock_gettime with gettimeofday.

clock_gettime(CLOCK_REALTIME) is unimplemented on OS X