Add a workaround for broken IDN extensions in some PHP versions