Fix implicit int -> bool cast performance warning
Add an int types header to deal with no stdint.h on certain MSVC versions