Fix build in Cygwin

With this patch, mpv builds successfully for me in Cygwin64.

As for that **BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE** flag, it could probably be removed entirely, since it's been in mingw-w64 and Cygwin's w32api for about 9 months. It's only missing from MinGW.org's headers.