Agents’ beliefs and the evolution of institutions for common-pool resource management