Thin-film semiconductor NO x sensor