Foundation: build fixes on Windows for the code that finds extensions.