Make the gem compatible with Rails v. > 3