scripts: link against librt only if required