Fix various windows compilation issues.
Fix formatting of exponent on Windows.