fix up library to be AMD compatible