Make it work with node v0.11.4

The query seems to be null when there is no query string in the url in the next release of nodejs.