MEMS-based humidity sensor with integrated temperature compensation mechanism