[dev-db/mongodb] port from tree, add a build fix for x86