Support timedelta_to_seconds on py2.6.