Added support for adding foreign Object to <g> element