Offhand, I'd guess that the CGI-executable method of calling PHP might look in the same directory as the .exe, whereas the ISAPI module would look in in the same directory of the .php script.
I guess a truly better answer would be this: why does it matter? Why would you set extension_dir to './' in the first place?