Fix crash caused by passing a large integer to ctime()