Fix incorrect cast in typemap in Sort.i