[xulrunner] Port bug 977015 workaround to gecko30