Fixes libwinpr build issue on Windows

Adds conditional statements in file.c to solve a Posix portability
issue on Windows introduced with the following commit:

913d532e0d3456945236567af00e8119564307ff
Merge pull request #1409 from alexpilotti/master

Fixes libwinpr build issue on Windows