Don't use regex to split query string since this doesn't work correctly in IE8

this fixes #552