work around missing Pattern.equals()