Added bson.cpp and bson.php with global functions for testing