include inttypes.h correctly and modify print strings to be portable