Costa Rica elects first female president