EU countries agree gas price cap to contain energy crisis