Some code beautification.
Change the macro CP_THREAD_ACP to CP_ACP, because the latter is more
widely defined.
Add a conditional macro definition in case FindFirstFile and
FindNextFile aren't properly defined (might happen on WinCE).
Suggested by Andy Polyakov <appro@fy.chalmers.se>