Fixed #5275 (FP mismatchAllocDealloc: user defined opendir()/closedir() on non-POSIX system)