Isn't "new Function" as evil as "eval" is evil? I guess when you call something a Compiler, it's allowed to do evilish stuff.
It's not insecure in this usage (even if it were used on the client), as all the actual code is generated by uglify-js via an AST and it takes care of properly escaping everything.