Fixed issues with abstract base classes and Rails 4.0

Hi,

This should solve issues with Rails 4.0 and abstract base classes when used with Kaminari. For more info, see this discussion: https://github.com/rails/rails/issues/10658

Sorry I didn't add test cases for this. I wasn't able to get the tests passing, and wasn't sure if I had everything set up properly, but will be happy to add some test cases if you can help me figure out how to get things passing again.