sync with commit from PR #347 in noVNC