Change to work with both 2.4 and 2.6 version of MongoDB output