i18nTools.eachI18nTagInHtmlDocument: Check that a node has a hasAttribute method before trying to call it.