Add support for inferring the name of an element with a script inside a <polymer-element>. This is currently only supported when the element is declared inside an HTMLImport. This is due to the fact that IE does not support document.currentScript.