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