use global instead of window. fixes compilation
Release 1.0.0