cleanup AMD definitions and add missing $win