improve browser detection