add fallback if document.currentScript is not available (e.g. with Webkitties)
Merge pull request #694 from kossebau/workaroundMissingCurrentScript

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