Update the build system to handle building and using haddock2