Use C99 types to be 64bit safe.

Thanks to Arvind Norberg for uncovering the issue!