‘The Hobbit’ holds off ‘Anchorman 2’ with $31.5m