Fix compile error systems which doesn't define TIMESPEC_TO_TIMEVAL