Added -ldl and -ltinfo to linker options.