configure change for Mac builds, plus some changes from Joel