Make memleak doctest work