Fix Mac OS compile issues