Fixes for building notmuch on Solaris