Restructure compat layer: #include_next headers moved to posix/ for MinGW, new standalone headers in msvc/ for MSVC (unistd.h, utime.h, getopt.h). Add getopt() implementation, chmod/unlink/chdir compat functions, MSVC CRT initializer for UTF-8 console, _pgmptr fix.