Add missing libraries when linking.

MFC after:	3 days
Sponsored by:	Mellanox Technologies