Fixes for Mongoid 3.1.4