when did the election of 1864 happen