sophia: update master to the latest sophia changes (macosx build)