fix for OS X calling gettimeofday() from time(), similar to dbrashear eb59447a6d41f03f9f3bd97876a766f9164c5993