Properly check for sizes support

`w.HTMLImageElement.sizes` is bogus -- there's no sizes property on the interface object. Per spec, it should be on the prototype, but that's not widely implemented yet (in some browsers it would go on the instance instead).
this and the prev line could use the same img-element, no need to create 2?