Simple browser detection code deprecated after jQuery 1.9