libm was added to the already modified definition of $WINLIBS. The file jtp_win.c needs the log function from it.