Only include sysctl if PTHREADS are being used.

This fixes an import error when compiling for Android/ARM
without PTHREADS.