Fix Leaflet URL detection, Refs #339