Fixed crash in static tests on OSX (!?).