US signs anti-terror agreement with Qatar