The EU and other international donors have agreed on a $2bn plan to fund permits for Syrian refugees who want to work legally in Jordan.