From Martin Naylor, replace osgDB::fstream with an osgDB::open() call.