Replaced new Image() with document.createElement('img') to avoid a potential bug in Chrome 27.