Fix for Chrome

img instanceof Image does not work in Chrome