Internet ad revenue hit $31.7 billion in 2011, topping previous record