Should check condition on variable $OS not $Platform

This includes too small fix to post build it on windows