UN apologises for giving Kerry letter from Hamas