More compatibility improvements

Hello!

First of all, thanks for good improvements to the original gem that seems abandoned by its maintainer. Your version helped a lot when I actually needed to make a Nested Set tree! And I went a little bit further, making it work not only for Sequel 3, but also for Sequel 4 (at least it works for me there). I think my edits can be helpful for you as well, so if they can be merged, that'd be great. And thanks again!

--
Best regards,
Olga Reznikova a.k.a. 1AdAstra1