Bad memset call if no random generator found.
Only link the required libraries for VTK 6.

When VTK links Qt5, the VTK library dependencies include listing like
Qt5::Core instead of Qt5Core, and this was causing link problems.