Ensure that Foundation.framework is imported before checking `NS_BLOCKS_AVAILABLE`

Fixes #786