Adjusted exports to hopefully support browserify (not tested!)