Fixed linker problem.

Any Windows build with cmake would try to link the tinfo library.