Bug 906040 followup - Use if-else rather than a ternary operator to work around link errors with GCC. r=h4writer on IRC