fix Decimal error in Python 2.6

fixes http://manage.dimagi.com/default.asp?100685#571691