additional undefined checks before referencing window
Created by: fozzle
Added additional undefined checks before referencing window, so dash.js can be used in module form in non-browser environments.
Primary example for this would be a server side rendered view that includes dash.js.
Not a frequent OSS contributor so let me know how I can help get this through :^)