On the voluntary provision of public goods under risk