Fixed linking with libdl.