minor changes, but the core idea remains the same
- additionally, switch off optimization flags to maybe allow build to complete on AppVeyor