Conditionally dispatch_release by iOS/OSX version

In iOS 6 or OSX 10.8, using dispatch_release is a compiler error because dispatch_semaphore has been converted into an NSObject.

To keep ARC's memory retaining semantics consistent, an ivar is used to store the semaphore. This will implicitly strong in NSObject-ed dispatch_semaphores, but assign in prior versions.