add untested workarround for fflush in matlab