Alaska court sides with Dunleavy in appointments dispute