truncate: handle the case in which off_t != intmax_t