North Seas countries have agreed on closer energy cooperation