Episcopal Church confirms change in law to allow same-sex marriages