fix download extensions pattern

when the param in link contains download extensions, it will match the old downlod extensions pattern.
eg.
``` js
var downloadExtensionsPattern = new RegExp('\.(' + 'jpg' + ')([?&#]|$)', 'i');
// the result will be true
downloadExtensionsPattern.test('http://hello.world.com?url=image.jpg');

// if we fix the download extensions pattern as follows
var downloadExtensionsPattern = new RegExp('^[^\\?]+\.(' + 'jpg' + ')([?&#]|$)', 'i');
// then it will be false
downloadExtensionsPattern.test('http://hello.world.com?url=image.jpg');
```

Although I think the better solution is to support customizing the downloadExtensionsPattern.