detect functions coming from other JavaScript contexts
Merge pull request #479 from Mithgol/detect-extracontextual-functions

also detect functions coming from other JavaScript contexts