UN endorses two-state solution declaration that condemns Hamas