RUBY-698 Support optional Regex compilation with pure Ruby de/serialization