Foreign investments, enforcement constraints and human capital accumulation