Made this branch compatible with QGIS pre-2.5 again