[Refactor] Avoid warnings on platforms where sizeof(size_t) != sizeof(long).