Construct the context dict in a way that's compatible with Python < 2.7.