At least 18 migrants have died while trying to cross into the Spanish enclave of Ceuta from Morocco, prompting a military response from Spain.