python 2 compatability for extensions

This should allow to compile huggle with python 2.