Fix an R alpha.centrality bug for undirected graphs

When sparse=TRUE.