fix for issue#7. tested on chrome/safari/firefox

fixes issue#7: use _currentScript (from the polyfills) to get the ownerDocument. if polyfills do not exist, use currentScript instead.