Rabin-Karp string search algoritm