Fix bug when using browserify

It couldn't work in the browser if use browserify to manage this