Closet 3-way switch or toggle
As the comments suggest, buy a pair of physical proximity switches, mount one for each door, and wire them in parallel. That way, either door, or both, will turn the light on when you open it.

Sample item:
door switch