Do not take global as default context but this for AMD distribution (should fix #323)

No idea how to test that. Would love to help. :)
Can you update this according to my comment above?