Normalized segment/section naming issues in relevant places - Fixes #1

Fix mingw build issue
Fix a few warnings.