Use cast instead of transmute from u64 to uint.

This fixes a build error on 32-bit targets.