ActiveRecord 4.1 compatibility

This PR fixes #435.