remove unnecessary intermediate variable
define MAP_POPULATE as a noop if not defined

This isn't defined on all platforms