Reimplemented automatic updates using pthreads.
This works around an ABI incompatibility when compiling with GCC 4.8.