fixed bug with reading M for --ref-ld-file