Fixed PATH variable name case on Windows when not capital

Reintroduced cycle over env variables to find the PATH variable.
This is only for Windows where variable name is case insensitive.