updates to support rails 4 and mongoid 4.beta1