Browserify global

Pass 'window' to wrap functions for browserify support.