Ex-Afghan security adviser to run for president