I can think of plenty of legitimate cases where one would use globals in a dynamically linked library. Most stdlib(libc) implementations have plenty of globals in them (think for a bit, you'll find enough of them being documented, like stdin/stdout/stderr). The most common case is where the library initializes a shared resource or object of some kind (of which you only need one instance that can be used by everything else). It's especially important if it's a resource which takes a while to initialize and doing so would cost plenty of resources. Or it could be a global cache of sorts which is again costly to recreate it time and thus it would defeat the whole purpose of the cache. On the other hand, in most OSes, you can load the same library multiple times if you really want to avoid such unique globals.
I can't think of a single implementation of any language which doesn't use globals in some way, no matter how hard they may try to not use them. Shared resources are everywhere (your CPU, RAM, GPU, NIC are such resources...), get used to it!