Add spinlock support for OSX