add in spin mutex specialization for osx
implement spinlocks for everyone else
small fix for threading on linux