Rupee extends gains to close year at 176.51 against dollar