adding gnuidn, with some woodoo