(scandir): Make argument of select function const.