A simple function to calculate the Levenshtein distance between two strings