Fix GridFSLoader

It seems that a previously proposed patch never made it into the repo (cf. issue #305)