Allow lsof to build on darwin (fixes #2219)

Closes #2219, closes #2223

Signed-off-by: Austin Seipp <aseipp@pobox.com>