Pakistan defy Roston Chase century to seal thrilling victory