fix use of curses on windows.

workaround for curses defining its own boolean type.
correct linker flags for picking visual studio runtime library.