move the browser specific code to it's own file

only exists for backwards-compatability with expectation of it being merged onto the global
if we could just overwrite window.D2L, then browserify would do this for us