If you know of a way to run an X11 application without using libx11, let me know.
I'm not going to argue about this any further. I've explained how you can solve your problem: write a shell script that locks xscreensaver between "lid closed" and "cpu halted". If that shell script talks to dbus, or does not talk to dbus, that's great either way. Linking additional libraries into the xscreensaver daemon is never, ever, ever going to happen, and if my explanation of why does not satisfy you, I guess we'll both just have to live with that.