prevent busy loop in ruby 1.8.7 exception handling

Not sure what the support policy is for 1.8.7, but I ran into a case where the EM thread enters a busy loop and uses ever-increasing memory if EM.run happens to be called from an exception handler. Here is a minimal repro:

https://gist.github.com/manlon/6058884

The behavior or $! seems fixed in ruby 1.9 but it is easy enough to work around here.