fix for both ITK < 4.6 and above