Risky environments, hidden knowledge, and preferences for contract flexibility