Prevent possible concurrent access to gitdll