Cast time_t value to unsigned long for *printf(3)

Prevent crash on platforms where sizeof(time_t) > sizeof(unsigned long),
see <http://thread.gmane.org/gmane.os.openbsd.ports/63555>.

Thanks to Florian Obser and Stuart Henderson for reporting this issue.