Wrapper: Compatibility with browserify

As described in https://github.com/Leaflet/Leaflet/pull/1572 , `this` won't refer to `window` when using browserify. Patching the wrapper should solve this issue.