Switch from using dylib to framework on OS X