The European Union on Tuesday agreed a compromise to enforce stricter rules on carbon dioxide emissions for EU cars, ending months of wrangling after Germany insisted an earlier deal was torn up.