added check for curses library
enabled to compile on cygwin