Added implementation of timedelta.total_seconds for backward compatibility.