fix clock_gettime alternative for Mac OS X