The problem here is that the generated function has to access a variable that is local to cwrap (cfunc).

I could use Function.bind to pass it to the function, but I think that would ruin the performance of the generated function (see http://jsperf.com/bind-versus-no-bind). The bet here was to favor the speed of the generated function over the speed of cwrap itself.

And there are other calls to eval in the same file, so I don't think this patch will cause any new portability issue.