Deal with BSON namespace change in Mongoid 4.0

Mongoid 4.0 no longer uses `Moped::BSON` but bson-ruby's `BSON`, which makes our tests not runnable.
This pull request try to solve it by checking existence of constant `Moped::BSON`.