Check first for `offsetWidth/offsetHeight` if the canvas parent `width/height` properties are undefined

@see https://groups.google.com/forum/#!topic/melonjs/SVVuYqjhSZ8