Judge: South Dakota to pay lawyer fees after fundraising ban