Fix buffer check for browserify compatibility.