Structural requirements of the tetrahydropteridine cofactor for the serine aldolase and the thymidylate synthetase reactions