Collinear laser spectroscopy of highly charged ions produced with an electron-beam ion source