who did abraham lincoln defeat in his presidential election in 1864?