Bug 947235 - Rewrite ternary to if-else to workaround a GGC quirk. r=me