fix to ImgMoment orientation computation, uses new SortWithIndices class