A canvas.toBlob() implementation