I agree with with @Sirko. Preferably, you should use feature-detection instead. An alternative to to Modernizr would be jQuery's $.support() function. It's not exactly the same thing, but it may suit your needs.
If you insist on browser-detection, you can write your own script using jQuery's $.browser() function.