Fix collect edges

This should fix issue #88, collect edges crashes when given a graph that implements edge_list.