Fix linking problems on Kubuntu.