Avoid link time issue.
Merge pull request #3916 from ktf/fix-visibility-issue

Fix visibility issue