total_seconds() is not available in Python 2.6