[javascript] Array.sort() doesn't sort numbers correctly