Allow zero length comparison

Analogous to how `strncmp()` handles a zero length comparison, `substr_compare()` with a zero length should return `0` as well.

Example:

    substr_compare("abc", "a", 0, 0); // 0