Add terminate method to HttpServer.