[JS] bugfix - must not free function name when it is bound to parameter list