China commits to safeguarding ships in Strait of Hormuz