Fix for HiDPI devices.

Images in canvas becomes blurry on HiDPI devices such as iPhone 5s, this patch fixes this problem. See also: http://www.html5rocks.com/en/tutorials/canvas/hidpi/