Use localCompare for sorting strings

So that accented characters get sorted correctly. Or at least as
correctly as browsers allow.