fix pyramid creation (trying to handle QGIS API changes)