changed error handling for browserify bundle
add working shims for browserify