fix code generation for @JavascriptFunction