Fixed hooks not executing under Cygwin