fix hangs in localtime for near-overflowing time_t values on 64-bit archs