Effects of Degree Distributions on Network Security Investments and Internalization of Externalities