Encapsulated thermopile detector array for IR microspectrometer