Adds function to get the data url from a canvas