US President Barack Obama has said that toppling the government of Syrian President Bashar al-Assad would be a mistake.