Updated to work with Leaflet 0.8-dev/ Leaflet 1.0

Leaflet now uses Leaflet.Layer instead of Leaflet.Class, so adding this allows it to work with current Leaflet, and with future Leaflet.