Include ctime for time_t (bug #21266)