Use the proper cast in connected_components.cc.