bug in reconnect after more than 30 secs.

makefile for OSX and for cygwin64. (dows not compile on cygwin32)