python 2.6 doesn't have timedelta.total_seconds()