Match user agent directly instead of $.browser variable

Our version of $.browser works differently than the "native"
version in jQuery 1.7

Fixes #369