common: fix format strings for off_t and uint64_t

This also fixes some warnings when using 32-bit compiler.
`uint64_t` - `"%ju"`
`off_t` - `"%lld"` + cast to `(long long)`