Fix use of 'callable' function with Python 3.1