Fixed Python 3 detection bug in configure script.