Fix for MongoDB 1.8.1 trigger serilization

Fix for MongoDB 1.8.1. Triggers were not getting serialized correctly. This seems to fix the problem