Import backtrace patch (by @masfj)