Fix #904: support 'ignore-certificate-errors' in some cases