Cast to long long before multiplication to avoid overflow

On 32-bit systems, time_t is 31 bits and overflows after ~24 days. This should
fix #38.