mapnik: boost 1.56 compatibility

:vertical_traffic_light: Please don't pull this yet; abusing the bot to make sure this builds against Boost 1.55.

Applies commits from mapnik/mapnik#2428 to address build failures observed against Boost 1.56 in #31428. This is the last issue blocking Boost 1.56.