Fixed compatibility issues between vtk 5 and 6

Some of the functions have changed in VTK 6. This should correct those problems.