fix constraint violation in qsort wrapper around qsort_r