Adding AMD-compatibity version

Thought this was helpful for my AMD app, so I'm sharing it.