EU countries agree on gas price cap to contain energy crisis