Apply fix from https://secure.simplistix.co.uk/support/issue333 for Python 2.6 compatiblity.

Thanks to Jean Jordaan for the patch!
Repare for 0.8.3 release.