I made a naive attempt here: #196
I explored a deeper fix with replacing _MAX_PATH with MAX_FILENAME_LENGTH, but one remaining issue with the _stat64 C library function not supporting longer filenames remains. A possible approach is to create a simple C++ library using std::filesystem; to wrap necessary calls to eliminate the need for _stat64.
If more users report this as an issue, it will be explored farther.