Tunisia and Libya agree to share responsibility for migrants stranded on border