Improve reliability of detecting Windows in the Makefile
- Removed the explicit setting of detected_OS in GitLab CI as this was a mistake
- Used the mechanism specified on the Stack Overflow answer: https://stackoverflow.com/questions/714100/os-detecting-makefile