added hook windows support using 'which' lib