Fixed an issue with JSRouter::generate().