Use standard AM_PATH_PYTHON rather than broken AS_PATH_PYTHON.

The AS_PATH_PYTHON macro is broken and does not respect $PYTHON when
version is specified. This causes serious breakage on Gentoo. Instead,
use the AM_PATH_PYTHON macro that is integral part of automake.