Convert Image to Base64 string with pure Javascript API provider by HTML5