Update ax_thread.m4 to the latest upstream version

Fixes #6.