This will break in v8 and node where window is not defined.

in dustjs-helpers we just did:

```
/* make a safe version of console if it is not available
 * currently supporting:
 *   _console.log
 * */
var _console = (typeof console !== 'undefined')? console: {
  log: function(){
     /* a noop*/
   }
};
```