Man legally changes gender to help win custody battle, infuriating trans rights group