Implement gettimeofday kernel function for non-Windows platforms. Helps some homebrew run.