bson: cast input for strlen() when len < 0.