Hyperfine structure in the H2+ and HD+ molecular ions at order mα6