fix url_for api compatibility issues
Merge pull request #13 from alexeiras/master

fix url_for api compatibility issues