improvement: ensure module.exports is available

this pull requests enables the use in a browser without any module dependency environment