fix crash in python 2.4 due to missing import
Merge pull request #1621 from nouiz/py24

fix crash in python 2.4 due to missing import