Enhancement of barrier properties of encapsulants for harsh environment applications