Ottawa to appeal same-sex ruling