Quantifying the robustness of complex networks against the spread of epidemics