Adapt Premote.wrap to accept a javascript remoting class object