Add missing stdint.h includes

Include stdint.h where used. This fixes Gentoo/FreeBSD build issues.
Reported by Mike Frysinger. Based on the fix by the same.