Wafer level packaging of MEMS