OK, so we're not actually using libauto events yet, but it's causing a few compilation errors. This fixes a few typos and adds a macro which excludes pthread.h if we're on Windows, fixing compilation, but this will need to be deliberated further.