Here everything compiles OK, but you know I am using main.
The wininet unit has not been touched for ages. Nobody uses it, only for very old simple examples somebody found on the InterWeb.
You can try jwaWindows instead of Windows/Wininet, that will draw in a slightly different version.
If the version of Wininet.pas has been touched or modified in the past 10-15 years or so, Marcov would know.
It is probably way back beyond the svn/git transitions because I can't find it. ( I am not good with git)