Fix library linkage