Add libs needed by iohandler merge to Makefile for FreeBSD

Copied from the Linux case added in r200263.  Discovered by the FreeBSD
buildbot - I tested the branch with cmake.
[libsanitizer] Fix compilation for gotsan.