[bug fix] make it work with browserify