[corlib] Fixed performance regression in qsort() functions