Fix compilation w/Qt4.

QDateTime::secsTo() return qint64 in Qt5 and int in Qt4.