fix XMI serialization in JS