BRUSSELS – The European Commission said on Thursday it had given Hungary two months to alleviate concerns over a law that imposes jail terms for groups that accept foreign funds for political causes, before the issue could be referred to the EU Court of Justice.