Fix missing timedelta.total_seconds() on Python 2.6