Climate accord grudgingly passed