Fix a bug, use ServiceLoader to load a customized ObjectSerializer which...

When using ServiceLoader to load a customized ObjectSerializer which  is not a public class. I found my ObjectSerializer was not take effect.