EU agrees on new legislation restricting admissibility of asylum claims