fix python3 compat issue

I found an NameError on Python 3.3.2, and propose small change to fix it.