Fix connection

Mongo class is deprecated in PECL < 1.3.0 I've changed client to work with both version without deprecation warning.