AM_PATH_CHECK is deprecated

So check it defined