Fix compilation bug when clock_gettime missing