BF - use different sort method to avoid mergsort for older numpy.

My attempt to fix #505 .