Cast void* to uintptr_t, not unsigned long.

Peter Breitenlohner report.