Fix hooks not being executed under Cygwin