Added missing Boost check
Added hack needed for compiling with libc++

It still fails at link time, however, which isn't surprising.  This is
probably going to need a more drastic fix: perhaps just a cmake option
to disable postgresql support.