Make undefined variables error, with an option to resolve to a global