added end emitter support for using in browser
1.1.1