[Rebase] Make fixes for VTK 6

I needed to rebase the PR #218 to use it in the homebrew pcl recipe.