low SRAM - how to switch include sd.h?

After checking all the options for reducing SRAM usage I still run out of memory.
I was often told: You cannot have the cake and eat it. Which turns out to be true.

For some reason, I want to stay with the UNO/NANO.
And on each run I only want to perform ONE of these procedures at a time:
a) sample data continuously and perform and display FFT
b) sample data continuously and log to an SD card.

The FFT needs 1024 bytes of LOCAL variables.
But once I do the
#include SD.h
it reserves 789 bytes of global memory.
(Using Petit-SD is not an option as it can not create/increase size of a file.)
Of course I could upload different sketches to select one of these options but that is not what I want. Or I could use an extra UNO for the second option.
I want a switch to select either a) or b) on setup.
My question is:
when I am not going to use the SD card, is there any way to free the memory that #include SD.h did reserve?