Updated to make dlclose more workable on win32 when building statically