Support ptr -> int casts