Ignore devicePixelRatio if it's undefined.

In older versions of Firefox, such as version 17, this causes the display to fail.
Adjust logic to be a bit clearer, and add comments.
Merge pull request #1269 from AnalyticalGraphicsInc/handleUndefinedDevicePixelRatio

Ignore devicePixelRatio if it's undefined.