Turkey has right to protect its border, says Erdogan