Fix module exports to allow for use in browser