Made browserify/amd compatible