SALEM – A Lynn construction worker, who admitted to drug charges and failing to register as a sex offender, was sentenced to three and one-half to four years in prison.Glen W. Todd, 36, of 77 Kirtland St., Lynn, pleaded guilty Thursday afternoon in Salem Superior Court to two counts of possession of cocaine with the intent to distribute and failing to register as a sex offender before Judge Timothy Q. Feeley.Feeley agreed to adopt the joint recommendation proposed by Assistant District Attorney Karen Hopwood and defense lawyer Michael T. Phelan.The charges arise out of two incidents in 2006 and 2011 in Lynn.In 2007, Todd was convicted of distribution of crack cocaine, subsequent offense, and a school zone violation involving a 2006 drug case, but the case was overturned by the Appeals Court last year. While out on bail on the 2006 case, investigators this past summer received information from a confidential informant that a man named “G” was distributing cocaine from a Kirtland Street apartment.Police set up surveillance and ,on the evening of June 2, raided an apartment where, as they approached Todd, he stuffed an object into his mouth, swallowing what authorities believe was cocaine.