Fix read_record on OS X.