Infant abandoned in median tested positive for cocaine, affidavit says