Merge pull request #5433 from davido/remove_mention_of_buffer_in_utils.js

Remove mention of Buffer in utils.js
diff --git a/js/binary/utils.js b/js/binary/utils.js
index 55a9ccd..99283c2 100644
--- a/js/binary/utils.js
+++ b/js/binary/utils.js
@@ -971,9 +971,10 @@
     return /** @type {!Uint8Array} */(new Uint8Array(data));
   }
 
-  if (data.constructor === Buffer) {
-    return /** @type {!Uint8Array} */(new Uint8Array(data));
-  }
+  if (typeof Buffer != 'undefined' && data.constructor === Buffer) {
+    return /** @type {!Uint8Array} */ (
+        new Uint8Array(/** @type {?} */ (data)));
+   }
 
   if (data.constructor === Array) {
     data = /** @type {!Array<number>} */(data);