Micromachined packaging for chemical microsensors