python 2.6 support

This was hacked very quickly.