Fix error about IIFE if the function is in a new

If a function is inside a `new` construct, it warns about IIFE while it shouldn't.