Adds casts for 64bit versions to appease compiler.