[hydro] Fix segfault on exit for OSX