Fix .so dependencies

Linker command line was incorrect, glib was missing from the NEEDED section.