attempt support for both mapnik 2.3.x and 3.x