Fix compile errors on 64-bit linux

While I was checking options for clang, I ran into a couple of compile errors caused by mixing 32-bit and 64-bit types. This patch replaces the problematic types with the types designed for pointer arithmetic.