Fixed issue with marshaling of ObjCClass objects causing ClassCastExceptions in the ObjC bridge. (#321)