added a contains shim for Chrome and other browsers lacking this function