Mildly acidic pH selects for chain elongation to caproic acid over alternative pathways during lactic acid fermentation.