Extend optimization flag handling for MSVC