Fix intermittent `Xcodeproj.write_plist` NoMethodError.

Related to #1497.