fix(option): remove window reference
fix(option): remove window reference

To make sure monapt can work in both node and client-side environments,
we need to avoid referencing `window`.  TypeScript 1.6 enables
extensions of built-in types.

jiaweihli/monapt,jiaweihli/monapt