change definitions in MabiPacket to use explicit-size integers. change c-style casts to c++ casts