Lebanon's Defence Minister Michel Menassa and Syrian counterpart Murhaf Abu Qasra have agreed on a deal to end days of bloodshed on their border.