Fix IE 9 issue due to the lack of SVGElement.children support

- use childNodes instead of children
- code cleanup for drawSVGELement