Ligand-induced folding of a two-component signaling receiver domain