Remove anonymous structs

On some compilers, the fact that there is a usage of an anonymous struct causes a warning. This change simply gives them names prior to the typedef.