enhances xmlObjectToString to address IE9 issue; fixes #2