cmake: Fix possible issues with librt during configure