Fix gdb backtraces on OSX.
We can't redirect output from gdb: since gdb will suspend us we won't
be able to read from the pipe we've redirected output to, and we'll
end up deadlocking if gdb outputs a lot of data (see bug #2548).
Revert fcbb571 and implement it differently.
The commit had the good idea but since some values of the enumeration overlap it broke the correct behavior. Instead we now turn off the extra options and use the previous way to check.