tools: cmake: fix librt linking (FS#1032)