NASCAR driver Montoya wins pole at New Hampshire