Updated to work with Leaflet 0.8-dev/ Leaflet 1.0