MAINT: int->npy_intp conversions in the ndimage interpolation C code

following a comment on scipy github issue 3733
This is a backported version of https://github.com/scipy/scipy/pull/4218