Tanzania swears in first female president