libreplace: move detection of clock_gettime to libreplace