Bugfix: Tests fail to run: 'ReferenceError: Can't find variable: global'

fixes #144

thanks @mileticn for the patch file :)