minor changes to make it work for cyg_win 64
included stdlib.h
added