add fallback if document.currentScript is not available (e.g. with Webkitties)

Fixes #693
> Throwing is nice, but who catches this?

Hm, right. If that is included by a `<script>` element in the header, I have no idea who could catch that. Written without thinking more it seems (perhaps not wanting to spent time on the unexpected, meh).
So an alert is the usual pattern on an error during code run on inclusion of a JS file? Okay, changed.
Not clear to me: where would you expect the documentation to be done, and what exactly do you mean with "expected global outcome"?