American Woodmark Corp. posts Q2 loss