Fixed safari resize bug

http://stackoverflow.com/questions/12554947/mobile-safari-renders-img-sr
c-dataimage-jpegbase64-scaled-on-canvas/12615436#12615436