Add typedefs for metadata structs

Not having them is messing up the haskell c2hs library for FFI generation. Mind if I put these in?