I wasn't reading the source code well enough!
OpenB3D has a function specifically to get the body coordinates from Newton: MQ_ApplyNewtonTransform_()
I've updated my code on github gist to use it, and it seems to work properly now. EDIT: No, there's still something odd happening; it seems that the cubes have their Z-axis inverted now.
P.S.: said code is under WTFPL, you can take it if you need it
