I do believe it has been done, at least once. From what I know it is a very complicated process. The 2wd is missing a lot of the secondary support systems built into the 4wd. Since the 4wd is computer controlled to a large degree, since the VSC and other control systems function somewhat different, you may be looking at something that is too complicated.
Have you considered the easier and cheaper option? Why not sell your 2wd and then buy a 4wd option?