Fixed array sorting in JS.

Who would guess, it sorts numbers lexicographically (i.e. as strings) by
default!