changes from the JavascriptFunction request made on codeplex
make JavascriptFunction enter JavascriptContext before calling apply

still throws AccessViolationException
fix up JavascriptFunction
rebase and fix up