UN: EU migrant exchange plan possibly illegal