support for RegExp coercion