Suggested fix for realm/realm-cocoa#1180