Wrap non-backward-compatible types in ifdefs.

This is what Rebar does:
https://github.com/rebar/rebar/search?utf8=%E2%9C%93&q=namespaced_types