Added OpenLayers 2.6 compatibility through backporting