(Reuters) - IBM said it had agreed to buy privately held Tealeaf Technology, a maker of software that helps companies analyze and react faster to customer behavior.