Characterization of the surfactin synthetase C-terminal thioesterase domain as a cyclic depsipeptide synthase.