Fix variable substitution section depending on Mapserver version