Adding fix for browsers without window.devicePixelRatio