Syrian government forces are reported to have captured two towns from Islamic State militants in the west of the country.