A polyfill for the canvas.toBlob method.