Fix friend class declarations.