[xulrunner] Add workaround for bug 977015