You can use Leaflet's browser detection. See http://leafletjs.com/reference.html#browser