Small, regex-based polyfill for URL function for use in in browser-based JS