Add our own totalseconds method since datetime in Py2.6 doesn't support it.