xa: fix build on 10.9 and add test