Support 'strict mode' Javascript.

* Missing `var` in for loop iterators.
* Global `PUBNUB` object created on `window`.