Books-A-Million posts smaller Q3 loss