update url import statement for compatibility

See http://stackoverflow.com/questions/8074955/cannot-import-name-patterns for details.