Fix RPATH issue when dlopen libraries thru TKernel.

Yes it is an ugly fix and doesn't work for build tree. CMake cannot handle it automatically :(