Tens of thousands in Beijing watch first flag raising despite heavy smog