fix typeof check for module and window
add APLv2 license
v1.0.1