autotools: detect a working Python 2 interpreter