EU leaders agree to 'work closely' with UK on reforms