Fix linking libraries.