Appeals court keeps military gay policy for now