Handle any structure type in MEDBox()

[Courtesy of](https://twitter.com/steipete/status/337124045537558530) @steipete. Based on https://github.com/PSPDFKit/PSPDFKit-Demo/blob/master/PSPDFKit.embeddedframework/PSPDFKit.framework/Versions/A/Headers/PSPDFKitGlobal.h#L183.