I was able to fix it by adding an extra path to ${MY_BIN_DIR} in the fixup_bundle command that includes the DLL directly. I'm not sure why it worked fine with msbuild and not with ninja, but that may just remain a mystery.