On the uniqueness of wreath products