Haftar agrees election-day truce