Fix issue #8232. Changed the ExecuteJavaScript extension method to corre...

...ctly detect if the script result is convertible to the generic type.