Fix DSO linking.

Signed-off-by: Mikhail Efremov <sem@altlinux.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>