Fix darwin compatibility