Thousands flee fighting in southern Philippines