more robust window.HanziWriter initialization