Added compact implementation of edit distance to diff.js