Abundances and excitation of a glycine precursor, methanimine, in compact obscured nuclei