Make sure cmp_time() doesn't mess up due to a time_t overflow.
Fixes bug 10643.