tk: fix build on darwin