attempt to fix compiler errors on cygwin

I think this should do it, as per that stack overflow link. Unless your earlier cast to `int` fixed the problem?