Work around a segfault in sort() on OS X 10.10.