Fixes a crash when setting up a unit test environment

Hi Peter,
We had a crash when executing our unit tests. Everything is fine while the app bundle is started, but starting the unit test bundle crashes. We fixed it by checking whether the class pairs already exist before registering them. The problem is that
objc_allocateClassPair returns nil if the class pair already exists, and calling objc_registerClassPair with a nil argument causes an EXC_BAD_ACCESS.

Oh, and thanks a ton for the great work! :-)