What about doing something like

  var exports = {};
  (function() {'use strict'; %s\n)());
  %s = exports;

And then, `exports` can be overwritten if needed.