Fix AMD support

If AMD is found a module is created but ALSO the global variable is defined. Fixes #71