fix up friend declarations. #2163