add support for amd compilation

Closes gh-13.