Add support for AMD define calls where available
Merge branch 'amd-support'