High-order mode selection in Q-switched Nd:YAG lasers