Remove use of $.browser (removed in jQuery 1.9) and use regex

Fixes #42

Ideally we'd improve the feature test to not need this but looks
like we still need it for IE6/7 which pass the feature test but
do need this override in order to work properly.