use 2.6 compat for timedelta.total_seconds