fix compile warnings on 32bit archs by converting uint64_t -> uintptr_t