ruby: fix build on < 10.6