Ignore devicePixelRatio if it's undefined.

In older versions of Firefox, such as version 17, this causes the display to fail.