Update android specific bits for newer rust.

s/cast/mem/