Federal judge orders Massachusetts to pay for killer's sex change