Judge orders compensation for gay couple denied benefits