Topology optimization of a MEMS device