msvc: opendir: fix malloc-failure