You can avoid declaration of global variables by adding them directly to the global object:
(function(global) {
...
global.varName = someValue;
...
}(this));
A disadvantage of this method is that global.varName won't exist until that specific line of code is executed, but that can be easily worked around.
You might also consider an application architecture where such globals are held in a closure common to all functions that need them, or as properties of a suitably accessible data storage object.