Fix some types by including stdint.h

Some compilers are still lagging behind in stdint.h support, so this is not portable and isn't necessarily mergeable to mainline at the moment.