Cutting costs, Masco posts sales decline in third quarter