align closer with MinGW port, reduce hacks