feat(backport): Compatibility with XUL Runtime 26 (refs #4682)

Backported commits from branch `2.0-integration`:
- 19decbfeeed3769c0cf35e863a6a9b3d4e192750
- 13f2298fa5a17760330c8242316633047e80a7bb
- 6e15b21c80a307363723942ba4b64bd87d4a17f6