Fix devicePixelRatio check for old browsers.