Entanglement in a superstatistical system