Seemed sexier then check for PHP 5.3+, stole it from https://github.com/mongodb/mongo-php-driver/pull/590