Hundreds surrender as ISIS nears defeat in last enclave