Optimal body mass index for minimizing the risk for osteoporosis and type 2 diabetes