Kevin,
BoxDim does not know whether the user is simulating a 2D or 3D system, so the caller to getVolume must provide the information. Yes, it is a poor design, but it would be take a large amount of effort to fix across the whole code base.
I don't see how external.periodic code could have worked in v2. In v2, users were encouraged - but not required - to set Lz=1 in 2D boxes. BoxDim computes the volume as Lx * Ly * Lz, so as long as Lz = 1, the value given is the correct numerical value for the box area. However, the remainder of the external.periodic code computes cross products and operates on the box as if it has 3D periodicity. At first glance, I don't see how this could be correct in 2D. One would need to write a completely separate code path.
When using v3, Lz will be 0 in most cases for 2D boxes. However, this is not a given. There are some corner cases (to support reading gsd files written by HOOMD v2) where a non-zero Lz is accepted, but ignored for 2D simulations in v3.