jME's RMI registry uses an internal SharedObject class to track
metadata about objects that have been shared. The problem is that when
you retrieve the shared object, the RMI implementation mistakenly
attempts to cast the SharedObject holder to the class of the actual
shared object. This PR fixes that bug by casting the actual shared
object instead of the SharedObject holder.