Update sample_db_script test database populating script to work on old versions of MongoDB