Fixed build for OS X