utils: Fix a compilation issue on Cygwin.

On Cygwin, feof() seems to be implemented as a macro that directly
accesses a field of FILE structure. Therefore, passing void* pointer to
feof() results in compilation error. This can potentially happen on every
platform where feof() is implemented in such a way.
Fixing it is trivial (casting to FILE * is enough).

Patch by nu774.