Improve browser detection