move typedefs to avoid wrong forward declaration