[runtime] Fix bug when marshaling COM interfaces in arrays