frontend: Prefer -ltinfo over -lncurses if available
frontend: Only link in libgcc_eh if it exists

Generally, whether libgcc_eh is present or not depends on the gcc build.
Normally on Linux distros libgcc_eh exists, but for example with gcc builds
for static linking there is no separate libgcc_eh.

Also, TDM-GCC doesn't have libgcc_eh, while normal MinGW has it.

It's nice to have fbc determine this automatically at runtime,
instead of requiring it to be handled through build-time options.