Add checks to configure.ac for MacOSX compatibility. Tested by Alex on Mac and me on Linux.