Fix for registeredClasses crash during program launch

Fix for Issue #364 
Due to possible buffer overrun when number of classes increases between calls to objc_getClassList.
I might be better to use `NSInteger`/`NSUInteger` wherever it's possible.