Federal appeals court upholds ruling to allow election betting