Use acorn to detect global variables in JavaScript