Use the configure script to prepare the build in Mac OSX too. Closes #2295.