fix problems with browserify & conditional includes. also fix some
issues with the browser buffer class not behaving properly