msContourLayerGenerateContour(): fix crash with GDAL trunk