Finds the longest common substring between two strings