Work around crash issues when building OSX binary