Fix issue 861: configure.sh fails on mac os x

This is a fixed up repeat of @tikhon's #862 so we can get #861 fixed before the next release.

It works for me, although #582 is still present and it breaks OB for an unknown number of OSX users. I haven't had time to find or fix it, but it does have an easy workaround (--disable-sqlite-crypt) which is posted in the issue thread