Tweak to make it easier to compile on ubuntu.

My gcc on ubuntu doesn't define intptr_t by default - although it may be
defined in stdint.h - but I'd rather not include that header just for
this use case since we can do a direct cast anyway.