fix: qsort_r

qsort_r is non-standard, esp. BSD and (newer) LINUX define it differently.
At least one has to test for it (testing OS is not enough).