As I just noticed in Bug 366242 getZOrderDOMWindowEnumerator does not return a usable window list on OS/2. This seems to be similar to Bug 156333 which is marked as a Linux/GTK problem. I have no clue so far where the fault may lie but probably somewhere in widget. If this gets fixed the BROKEN_WM_Z_ORDER define can be removed from browser/components/nsBrowserContentHandler.js for OS/2.
Just a note to whoever will find time to investigate this: the function to start looking at seems to be nsWindowMediator::GetZOrderDOMWindowEnumerator() in xpfe/appshell/src/nsWindowMediator.cpp (still seems to be used even for Toolkit apps) that in turn makes use of the nsASDOMWindowFrontToBackEnumerator class from xpfe/appshell/src/nsAppShellWindowEnumerator.cpp.
OS/2 is no longer in the tree.