Fix float -> Decimal conversions so that they work on Python 2.6 (@jerith).