Human "logic" is only an approximation of real logic and often falls short in cases like this. So lets try a mathematical approach.
1) The sum of probabilities of every possibility equals 1.
2) When a child is born (ignoring hermaphrodites and slight deviations) there are 2 equal possibilities:
B
G
Because of 1) either chance is 1/2.
3) With a second child the possibilities become:
B-B
B-G
G-B
G-G
Creating 4 equal possibilities, each with a chance of 1/4 -> 4 * 1/4 = 1.
4) This implies the chance of having two boys is half that of having both a boy and a girl.
Because there is only one way to have 2 boys, but 2 ways to have both a boy and a girl - as long as no sequence of birth is specified.
5) Now we know G-G is out. That leaves us with these options:
B-B
B-G
G-B
Because the sum of probabilities of every possibility equals 1 and all three options have equal probability they each have chance 1/3.
6) Without additional information (for example, how the oldest child is a boy - we don't know that.) we cannot remove other possibilities. With 3 options of equal probability a chance of 1/2 is impossible.
7) Now without loss of generalisation we can reorder the above:
B-B
B-G
B-G
Which makes it clear chance of a second boy is 1/3.
Look at it this way: In a family of two kids the chance of having single sex offspring (B-B or G-G) is equal that of having mixed sex offspring (B-G or G-B).
Thus, if we remove 1 of the single-sex options the chance of having mixed-sex offspring increases.
@ Earthborn:
If I read your program correctly you assign the first child "boy", then randomly assign the second child boy or girl.
If you would like to improve the model, please try this:
Randomly assign the first child boy or girl.
Randomly assign the second child boy or girl.
(Now you have 'n' families, each with two random chosen children. I think it makes sense, so far

)
Remove all families with only girls.
From all remaining families, remove one boy. (Since you've seen him, he's no longer an unknown.)
Count the number of remaining boys and girls.
What I don't understand is how this is different from the 'gambler's fallacy', that the previous flip of the coin affects the next one, and so on.
Good question. You can plug it in the above calculation.

See step 6). Since the gambler knows the outcome of his last throw, the 3 remaining possibilities collapse further into 2 - each whith a chance of 1/2.