/**
 * Create a blob builder even when vendor prefixes exist
 */

var BlobBuilder = window.BlobBuilder
  || window.WebKitBlobBuilder
  || window.MSBlobBuilder
  || window.MozBlobBuilder;

/**
 * Check if Blob constructor is supported
 */

var blobSupported = (function() {
  try {
    var b = new Blob(['hi']);
    return b.size == 2;
  } catch(e) {
    return false;
  }
})();

/**
 * Check if BlobBuilder is supported
 */

var blobBuilderSupported = BlobBuilder
  && BlobBuilder.prototype.append
  && BlobBuilder.prototype.getBlob;

function BlobBuilderConstructor(ary, options) {
  options = options || {};

  var bb = new BlobBuilder();
  for (var i = 0; i < ary.length; i++) {
    bb.append(ary[i]);
  }
  return (options.type) ? bb.getBlob(options.type) : bb.getBlob();
};

module.exports = (function() {
  if (blobSupported) {
    return window.Blob;
  } else if (blobBuilderSupported) {
    return BlobBuilderConstructor;
  } else {
    return undefined;
  }
})();

@@ -77,22 +77,22 @@
 ilder = 
-window
+global
 .BlobBui
@@ -101,22 +101,22 @@
 er%0A  %7C%7C 
-window
+global
 .WebKitB
@@ -131,22 +131,22 @@
 er%0A  %7C%7C 
-window
+global
 .MSBlobB
@@ -157,22 +157,22 @@
 er%0A  %7C%7C 
-window
+global
 .MozBlob
@@ -842,14 +842,14 @@
 urn 
-window
+global
 .Blo

Use global instead of window