Fix compilation error on Mac OS X: OS X does not have clock_gettime.

Signed-off-by: Kenneth Heafield <github@kheafield.com>