Carbon monoxide depletion in Orion B molecular cloud cores