Build fix - made some casts compile on 64-bit.