fix building on MAC. fixes bug 3835, 'autogen.sh fails with invalid test on line 33'