Polyfill for HTML5's `document.currentScript`.