BUG: fix build in c99 mode

The definition of off_t is located in sys/types.h and is not pulled
by other files when compiling in c99 mode instead of the default gnu89.
Closes gh-5231