[bindings] better sed portability in configure.ac

Basic REs don't always support \?; use \{0,1\} instead, which
works on OS X.