Extend compatibility with mongodb 1.2.x and 1.3.x