Use inttypes.h macros when printing int types