Print an intX_t by casting to int64_t

The internal intX_t is either int32_t or int64_t depending on
platform bitness. Since there is no existing printf format for
such an integer, cast it to an int64_t and use the right
printf format for that instead.

This avoids warnings when building with clang.
Merge pull request #1010 from mstorsjo/fix-log-format

Print an intX_t by casting to int64_t