Fix interp1

This fixes a bug in interp1 for the case when the collocation points are unsorted.