build: fix string comparisons in autogen.sh

Compare strings with '=', not '=='.  The second form doesn't work with
all shells.

Fixes #876.