graph.js: fix an issue where a certain global variable is not yet defined