Added support for calling JS functions in JSObject.