Substitute Joe Mason gave Bolton a last-gasp 1-0 victory over Huddersfield in the Sky Bet Championship.