Connected graphs cospectral with a friendship graph