fix clibext for MSVC
fix unsetenv function return value
fix opendir function wildcards processing