Added a check for global.Buffer before .isBuffer

Need this check for the future where we remove the browserify insertion
of Buffer. It is also cleaner to check, I believe.