COMP: fix vtk5 compilation

Needed a #if around some code, fixed a method name.

Issue #2919