Added check for exports instead of window for browserify- fixes #66