Thailand's king has formally appointed the army chief as head of the nation's new military junta following a recent coup.