My implementation of KMP search