El Salvador elects leftist president Funes