Markov Additive Processes and Repeats in Sequences