BUG: fix build in c99 mode

The header include for 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