Volatility, Labor Market Flexibility, and the Pattern of Comparative Advantage