Fix static builds for Mac OS X