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