Same fix as 6c7250e for 1.x branch

Wrapping OSStatus and NSCAssert with NS_BLOCK_ASSERTIONS macro to prevent unused variable.