Don't make a JValue out of the pointer.

Also, don't use longs for pointer offset given that we just convert
them to ints later on (over and over again).