Better C struct/constant forwarding to JS (#1554)

More information in [my comment](https://github.com/kripken/emscripten/issues/1554#issuecomment-24553086).