Does the IDE include AltSoftSerial even if in mainLoop.ino I use
Yes, it odes. When the IDE scans the code it is looking for #include statements. It does NOT care that they will not actually be part of the cpp file that the compiler will see.
Do you think there is anyway to handle this problem instead of changing most of the AltSoftSerial library?
Don't use the IDE. If you do, you must make AltSoftSerial compile when the board is the Due. It really isn't that hard.
In the header file, inside the inclusion guard, add:
#if !defined (whatever makes it a due)
At the bottom, before the #endif, add another #endif.
Do the same in the source file. When the compiler sees the AltSoftSerial.cpp file, it will appear to be empty, and the class definition in the header file won't exist. Empty files compile easily.