Fix bug when using with browserify