Structural basis for the function of Bacillus subtilis phosphoribosyl-pyrophosphate synthetase