Add Path.toHash for DUB compatibility.