substr_compare(): Allow zero length comparison

Treat zero length comparison as always equal.