Solve a type-inference problem in imfilter_gaussian
Safe integer conversion