Fix build on i386 platform.

time_t and off_t params must be explicitly casted to compile on
32 bit platforms without warnings (and intmax_t is the most
suitable casting in this case).