replace exec by eval to ensure the c variable is defined for all relevant python versions
Merge pull request #3230 from jdkloe/1.7.x

Fix for issue 3192 - backport of f31f0fbe45