Constraints and period relations in bosonic strings at genus g