added compatibility with VTK Major version <= 5