made libldr buildable with MSVC

* implemented dirent counterpart