fix referenceError for global/window
release 0.3.1