fix objectEncoding bug, default to AMF0, change to AMF3 if required.