StructTest: Benchmarking LLMs' Reasoning through Compositional Structured Outputs