build: fix syntax error on older m4/autoconf.

Fixes #3358. This affects preinstalled autotools on osx 10.6.
Merge pull request #3393 from theuni/build-10.6

build: fix syntax error on older m4/autoconf.