Fixing `length` check.

`hasOwnProperty('length')` is not supposed to work on an `NodeList` as it's an inherited property.
Fixing `window.devicePixelRatio` stubbing.

It was not overridden in Gecko. The code was altered to accept an optional context, possibly not containing the expected property.
Merge pull request #72 from oncletom/fix-firefox-testing

[READY] Gecko Compatibility