Gender beliefs and cooperation in a public goods game