Electromagnetic cloaking devices for TE and TM polarizations