graph2dot: Fix use of deprecated API