Ternary expressions incorrectly evaluated

User Agent override was not being set due to the ternary expressions being incorrectly evaluated.

See warning note at http://www.php.net/ternary#language.operators.comparison.ternary
Merge pull request #1 from dmackie/master

Ternary expressions incorrectly evaluated