added (de)serialization for 16-bit extended types with portable flag set