fixes issues with tagName checking on svg elements